import 'package:flutter/material.dart';
import 'package:charts_flutter/flutter.dart' as charts;
import 'package:flutter/rendering.dart';
import "package:flare_flutter/flare_actor.dart";
import 'package:flutter_screenutil/flutter_screenutil.dart';
class Test3 extends StatefulWidget{
    _TestState createState() => _TestState();
}

class _TestState extends State<Test3> {

    String _year;
    int _sales;

     _onSelectionChanged(charts.SelectionModel model) {
        final selectedDatum = model.selectedDatum;

        for(var item in selectedDatum){
            print(item);
        }
        setState(() {
            _year = selectedDatum.first.datum.year;
            _sales = selectedDatum.first.datum.sales;
        });
    }

    

  @override
  Widget build(BuildContext context) {

    return new Scaffold(
        appBar: AppBar(
            title: Text("flurs动画示例"),
            centerTitle: true,
        ),
        body: Container(
            child: FlareActor(
                "flrs/loadinggg.flr",
                alignment: Alignment.center,
                fit: BoxFit.contain,
                animation: 'loading',
            ),
        ),
        
    );
  }


}
